package com.lvmama.pangolin.mt.service.impl;


import com.lvmama.pangolin.entity.mt.MTTicket_CommodityDetail;
import com.lvmama.pangolin.entity.spider.TicketCommodity;
import com.lvmama.pangolin.mt.service.MTTicketCommodityDetailService;
import com.lvmama.pangolin.mybatis.mapper.mt.MTTicketCommodityDetailMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

@Transactional
@Service
public class MTTicketCommodityDetailServiceImpl implements MTTicketCommodityDetailService {
    /**
     * @Title：TCTicketCommodityDetailServiceImpl.java
     * @Author:zhoutianqi
     * @Description:
     * @Date：2017年2月17日上午11:19:51
     */
    @Autowired
    private MTTicketCommodityDetailMapper MTTicketCommodityDetailMapper;

    @Override
    public List<MTTicket_CommodityDetail> getMTTicket_CommodityDetailListByID(Map<String, Object> map)
            throws Exception {
        return MTTicketCommodityDetailMapper.getMTTicket_CommodityDetailListByID(map);
    }

    public int insertCommodityDetailLog(MTTicket_CommodityDetail detail) throws Exception {
        return MTTicketCommodityDetailMapper.insertCommodityDetailLog(detail);
    }

    public List<MTTicket_CommodityDetail> selectAllLog() {
        return MTTicketCommodityDetailMapper.selectAllLog();
    }

    public List<MTTicket_CommodityDetail> queryLogByMap(Map<String, Object> map) {
        return MTTicketCommodityDetailMapper.queryLogByMap(map);
    }

    public int deleteLogByMap(Map<String, Object> map) {
        return MTTicketCommodityDetailMapper.deleteLogByMap(map);
    }

    public int updateLog(MTTicket_CommodityDetail detail) {
        return MTTicketCommodityDetailMapper.updateLog(detail);
    }

    public int deleteLogByID(String detail_id) {
        return MTTicketCommodityDetailMapper.deleteLogByID(detail_id);
    }

    @Override
    public int insert(TicketCommodity record) {
        return MTTicketCommodityDetailMapper.insert(record);
    }

    @Override
    public int insertSelective(TicketCommodity record) {
        return MTTicketCommodityDetailMapper.insertSelective(record);
    }

    @Override
    public List<MTTicket_CommodityDetail> getMTTicket_CommodityDetailLogListByID(Map<String, Object> map) throws Exception {
        return MTTicketCommodityDetailMapper.getMTTicket_CommodityDetailLogListByID(map);
    }

    @Override
    public int deleteByTaskAndProd(TicketCommodity record) {
        return MTTicketCommodityDetailMapper.deleteByTaskAndProd(record);
    }
}
